Skip to content

feat: upgrade to OpenShell v0.0.59 and adopt --env flag#59

Merged
robbycochran merged 2 commits into
mainfrom
rc/openshell-059-env
Jun 11, 2026
Merged

feat: upgrade to OpenShell v0.0.59 and adopt --env flag#59
robbycochran merged 2 commits into
mainfrom
rc/openshell-059-env

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade to OpenShell v0.0.59 (released 2026-06-09) which ships PR #1730: --env KEY=VALUE on sandbox create/exec and a fix for env vars being silently dropped in SSH sessions
  • Replace the file-based env injection workaround (sandbox.env upload + source in startup) with native --env flags
  • Add version guard that warns when openshell CLI is below v0.0.59
  • Bump Helm chart version to 0.0.59

Before

Agent YAML -> BuildEnvSh() -> write sandbox.env -> upload via --upload
-> source sandbox.env in startup command -> cat >> .bashrc for exec sessions

After

Agent YAML -> BuildEnvMap() -> pass via --env KEY=VALUE on sandbox create
-> vars are directly in the container environment

No files, no sourcing, no .bashrc append. OpenShell handles env var injection natively across all four compute drivers (Docker, Podman, K8s, VM).

Test plan

  • make test passes (Go unit tests + 29 bats preflight tests)
  • 7 new tests: --env arg wiring, version parsing, min-version check, BuildEnvMap merge/override/empty
  • Existing tests updated to reflect removed env.sh/sandbox.env generation
  • Manual: harness up --local --show-commands — verify --env KEY=VALUE flags in openshell sandbox create output
  • Manual: openshell sandbox exec <name> -- env | grep ANTHROPIC_BASE_URL — confirm env var present without file sourcing

🤖 Generated with Claude Code

…nv injection

OpenShell v0.0.59 (PR #1730) adds --env KEY=VALUE to sandbox create/exec
and fixes a bug where user-specified env vars were silently dropped in SSH
sessions. This replaces the file-based env injection workaround.

Before: BuildEnvSh() -> write sandbox.env -> upload via --upload -> source
in startup command -> cat >> .bashrc for exec sessions.

After: BuildEnvMap() -> pass via --env flags on sandbox create -> vars are
directly in the container environment. No files, no sourcing.

- Add Env map to SandboxCreateOpts, wire --env flags in CLI (sorted)
- Add BuildEnvMap() to AgentConfig, refactor BuildEnvSh() to use it
- Remove env.sh/sandbox.env generation from RenderPayload()
- Remove env.sh sourcing from BuildRunSh()
- Simplify startup commands in up/create/launch (no more source/cat)
- Add ParseCLIVersion() and CheckMinVersion() version guard
- Warn on startup if openshell CLI is below v0.0.59
- Bump chart-version to 0.0.59
- Add 7 new tests covering --env args, version parsing, min-version check
@robbycochran robbycochran force-pushed the rc/openshell-059-env branch from 0fb14b1 to a269e02 Compare June 11, 2026 15:38
@robbycochran robbycochran merged commit 5aa60cb into main Jun 11, 2026
5 checks passed
@robbycochran robbycochran deleted the rc/openshell-059-env branch June 13, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant